package com.feicheng.controller;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.feicheng.base.common.DaoConstant;
import com.feicheng.base.exception.SystemException;
import com.feicheng.base.result.Result;
import com.feicheng.entity.SaleOrderHeader;
import com.feicheng.entity.SaleOrderItem;
import com.feicheng.model.SaleOrderHeaderUser;
import com.feicheng.model.SaleOrderHeaderWithSaleOrderItem;
import com.feicheng.service.ProviderSaleController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 周启博
 * @since 2022-06-27
 */
@RestController
@RequestMapping("/sale-order-item")
public class SaleOrderItemController {

    @Autowired
    ProviderSaleController providerSaleController;

    /**
     * 销售详情页面
     * @param saleId (销售表主键)
     * @author shuoyu.qian
     * @return
     */

    @GetMapping("/sale_order/info/g")
    public Result saleOrderItemPage(
            @RequestParam(defaultValue = "1") Integer current,
            @RequestParam(defaultValue = "4") Integer size,
            Integer saleId){

        //查询数据并返回结果
        return providerSaleController.saleOrderItemPage(current, size, saleId);

    }
}